<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - cover.info - /home/andres/Programacion/aso_coverage/aso/src/ASO/framework/combinatory_obs.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td width="5%"></td>
          <td width="10%" class="headerItem">Current view:</td>
          <td width="35%" class="headerValue"><a href="../../../../../../../../index.html">directory</a> - <a href="index.html">home/andres/Programacion/aso_coverage/aso/src/ASO/framework</a> - combinatory_obs.h (source / <a href="combinatory_obs.h.func.html">functions</a>)</td>
          <td width="10%"></td>
          <td width="10%" class="headerCovTableHead">Found</td>
          <td width="10%" class="headerCovTableHead">Hit</td>
          <td width="15%" class="headerCovTableHead">Coverage</td>
          <td width="5%"></td>
        </tr>
        <tr>
          <td></td>
          <td class="headerItem">Test:</td>
          <td class="headerValue">cover.info</td>
          <td class="headerItem">Lines:</td>
          <td class="headerCovTableEntry">25</td>
          <td class="headerCovTableEntry">25</td>
          <td class="headerCovTableEntryHi">100.0 %</td>
        </tr>
        <tr>
          <td></td>
          <td class="headerItem">Date:</td>
          <td class="headerValue">2010-08-03</td>
          <td class="headerItem">Functions:</td>
          <td class="headerCovTableEntry">6</td>
          <td class="headerCovTableEntry">5</td>
          <td class="headerCovTableEntryMed">83.3 %</td>
        </tr>
                <tr><td><img src="../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<a name="1"><span class="lineNum">       1 </span>                : #ifndef COMBINATORY_OBS_H</a>
<span class="lineNum">       2 </span>                : #define COMBINATORY_OBS_H
<span class="lineNum">       3 </span>                : 
<span class="lineNum">       4 </span>                : #include &quot;common_types.h&quot;
<span class="lineNum">       5 </span>                : #include &quot;combinatory_policy.h&quot;
<span class="lineNum">       6 </span>                : #include &quot;antiviral_set.h&quot;
<span class="lineNum">       7 </span>                : 
<a name="8"><span class="lineNum">       8 </span>                : /*! Definicion de MutantObs */</a>
<span class="lineNum">       9 </span>                : struct MutantObs
<span class="lineNum">      10 </span><span class="lineCov">             24 : {</span>
<span class="lineNum">      11 </span>                :     const AntiviralSet   antivirals;      //! antivirales que produjeron las mutantes
<span class="lineNum">      12 </span>                :     const SequenceSet    sequences;       //! sequencias de las mutantes
<span class="lineNum">      13 </span>                :     const DistanceValue  distance;        //! distancia de mutación
<span class="lineNum">      14 </span>                :     const ChildId        parent;          //! nodo del cual evolucionaron las mutantes
<a name="15"><span class="lineNum">      15 </span>                : </a>
<span class="lineNum">      16 </span>                :     /*! Constructor de MutantObs */
<span class="lineNum">      17 </span><span class="lineCov">             24 :     MutantObs(const AntiviralSet&amp; antivirals, const SequenceSet&amp; sequences, DistanceValue distance, const ChildId&amp; parent):</span>
<span class="lineNum">      18 </span><span class="lineCov">             24 :             antivirals(antivirals), sequences(sequences), distance(distance), parent(parent)</span>
<span class="lineNum">      19 </span><span class="lineCov">             24 :     {}</span>
<span class="lineNum">      20 </span>                : };
<span class="lineNum">      21 </span>                : 
<a name="22"><span class="lineNum">      22 </span>                : /*! Implementación de un observer de combinaciones */</a>
<span class="lineNum">      23 </span>                : class CombinationObserverImp: public CombinationObserver
<span class="lineNum">      24 </span><span class="lineCov">            313 : {</span>
<a name="25"><span class="lineNum">      25 </span>                : public:</a>
<span class="lineNum">      26 </span>                :     //! Constructor
<span class="lineNum">      27 </span><span class="lineCov">            313 :     CombinationObserverImp(NucSequence sequence, const ChildId&amp; parentNode, Observer&lt;MutantObs&gt;* observer)</span>
<span class="lineNum">      28 </span><span class="lineCov">            313 :     : sequence(sequence), observer(observer), parentNode(parentNode)</span>
<span class="lineNum">      29 </span><span class="lineCov">            313 :     {}</span>
<span class="lineNum">      30 </span>                : 
<span class="lineNum">      31 </span>                : private:
<span class="lineNum">      32 </span>                :     NucSequence sequence;           //! virus base
<span class="lineNum">      33 </span>                :     Observer&lt;MutantObs&gt;* observer;  //! grupo de observadores
<span class="lineNum">      34 </span>                :     const ChildId parentNode;
<span class="lineNum">      35 </span>                : 
<span class="lineNum">      36 </span>                :     /*! Actualizar el Observador de Combinaciones */
<span class="lineNum">      37 </span>                :     inline bool update(const Avs* comb);
<span class="lineNum">      38 </span>                : };
<a name="39"><span class="lineNum">      39 </span>                : </a>
<span class="lineNum">      40 </span>                : 
<span class="lineNum">      41 </span><span class="lineCov">             24 : bool CombinationObserverImp::update(const Avs* comb)</span>
<span class="lineNum">      42 </span>                : {
<span class="lineNum">      43 </span><span class="lineCov">             24 :     std::cout &lt;&lt; &quot;combinacion: &quot;; </span>
<span class="lineNum">      44 </span><span class="lineCov">             24 :                         CAutonomousIterator&lt;Avs&gt; Ait (*comb);</span>
<span class="lineNum">      45 </span><span class="lineCov">             24 :                         while(!Ait.end())</span>
<span class="lineNum">      46 </span>                :                         {
<span class="lineNum">      47 </span><span class="lineCov">             53 :                                 size_t id = 0;</span>
<span class="lineNum">      48 </span><span class="lineCov">             53 :                                 (*Ait)-&gt;get_attrib(&quot;id&quot;, id);</span>
<span class="lineNum">      49 </span><span class="lineCov">             53 :                                 std::cout &lt;&lt; id &lt;&lt; &quot;|&quot;;</span>
<span class="lineNum">      50 </span><span class="lineCov">             53 :                                 ++Ait;</span>
<span class="lineNum">      51 </span>                :                         }
<span class="lineNum">      52 </span><span class="lineCov">             24 :         std::cout &lt;&lt; std::endl;</span>
<span class="lineNum">      53 </span><span class="lineCov">             24 :     MutantDist mutation;</span>
<span class="lineNum">      54 </span><span class="lineCov">             24 :     ResisBasedAntiviral antiviralComb(&quot;Comb&quot;, 0, tComb, cComb);</span>
<span class="lineNum">      55 </span><span class="lineCov">             24 :     AntiviralSet aux;</span>
<span class="lineNum">      56 </span><span class="lineCov">             24 :     aux.antivirals = *comb;</span>
<span class="lineNum">      57 </span><span class="lineCov">             24 :     aux.combine_set(antiviralComb);</span>
<span class="lineNum">      58 </span><span class="lineCov">             24 :     antiviralComb.mutate_sequence(sequence, mutation);</span>
<span class="lineNum">      59 </span>                :     /*! notifica la creacion de un nuevo grupo de mutantes */
<span class="lineNum">      60 </span><span class="lineCov">             24 :     observer-&gt;update(new MutantObs(aux, mutation.sequences, mutation.distance, parentNode));</span>
<span class="lineNum">      61 </span><span class="lineCov">             24 :     return true;</span>
<span class="lineNum">      62 </span>                : }
<span class="lineNum">      63 </span>                : 
<span class="lineNum">      64 </span>                : #endif
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.7</a></td></tr>
  </table>
  <br>

</body>
</html>
